<%--
  User: Shengzhao Li
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>账务类型</title>
</head>
<body>
<%--account type overview page--%>
<div id="account_type_overview_page" data-role="page" class="page">
    <div data-role="header" data-theme="f">
        <a href="${contextPath}/m/dashboard" data-icon="home" data-direction="reverse" data-transition="slide">主页</a>

        <h1>账务类型</h1>
        <a href="form" data-icon="plus" data-transition="slidedown">创建</a>
    </div>
    <div data-role="content">
        <div data-role="collapsible" data-collapsed="false" data-theme="a" data-content-theme="c">
            <h3>我创建的 (${accountTypeOverview.selfAccountTypeSize})</h3>
            <ul data-role="listview" data-inset="true">
                <c:forEach items="${accountTypeOverview.selfAccountTypes}" var="type">
                    <li data-theme="${type.style.label}">
                        <a href="form?guid=${type.guid}" data-transition="slide"><img
                                src="${contextPath}/images/mobile/${type.daily?"d.gif":"n.gif"}" alt=""
                                class="ui-li-icon">
                                ${type.name} <c:if test="${not type.publicity}">
                                <img src="../../images/mobile/lock.png" alt="private"/>
                            </c:if>
                            <span class="ui-li-count ${type.publicity?'color-b':''}">${type.usedTimes}</span></a>
                    </li>
                </c:forEach>
                <c:if test="${empty accountTypeOverview.selfAccountTypes}">
                    <li>
                        <div class="ui-grid-a">
                            <div class="ui-block-a">还没创建任何的账务类型哦.
                                <a href="form" data-role="button" data-icon="plus" data-inline="true" data-mini="true">点击添加</a>
                            </div>
                            <div class="ui-block-b">&nbsp; </div>
                        </div>
                    </li>
                </c:if>
            </ul>
        </div>
        <div data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c">
            <h3>默认创建的 (${accountTypeOverview.defaultAccountTypeSize})</h3>
            <ul data-role="listview" data-inset="true">
                <c:forEach items="${accountTypeOverview.defaultAccountTypes}" var="type">
                    <li data-theme="${type.style.label}">
                        <a href="form?guid=${type.guid}" data-transition="slide"><img
                                src="${contextPath}/images/mobile/${type.daily?"d.gif":"n.gif"}" alt=""
                                class="ui-li-icon">${type.name} <c:if test="${not type.publicity}">
                            <img src="../../images/mobile/lock.png" alt="private"/>
                        </c:if>
                            <span class="ui-li-count ${type.publicity?'color-b':''}">${type.usedTimes}</span></a>
                    </li>
                </c:forEach>
            </ul>
        </div>

        <%--back action--%>
        <%--<div data-role="controlgroup">--%>
        <%--<a href="/m/account/overview" data-role="button" data-icon="arrow-l" data-direction="reverse"--%>
        <%--class="color-b">返回</a>--%>
        <%--</div>--%>
    </div>
    <div data-role="footer" data-position="fixed" data-theme="c">
        <div data-role="navbar">
            <ul>
                <li>
                    <a href="../account/overview" data-icon="arrow-l" data-transition="flip">返回</a>
                </li>
            </ul>
        </div>
    </div>
</div>
</body>
</html>